<?xml version='1.0' encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <link href="cpip.css" rel="stylesheet" type="text/css" />
    <title>File: /Users/paulross/dev/linux/linux-3.13/include/linux/suspend.h</title>
  </head>
  <body>
    <h1>File: /Users/paulross/dev/linux/linux-3.13/include/linux/suspend.h</h1>
    <p>Green shading in the line number column
means the source is part of the translation unit, red means it is conditionally excluded.
Highlighted line numbers link to the translation unit page. Highlighted macros link to
the macro page.</p>
    <pre><a name="1" /><span class="True">       1:</span> <span class="f">#</span><span class="n">ifndef</span> <a href="cpu.c_macros_noref.html#_X0xJTlVYX1NVU1BFTkRfSF8w"><span class="b">_LINUX_SUSPEND_H</span></a>
<a name="2" /><span class="True">       2:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_X0xJTlVYX1NVU1BFTkRfSF8w"><span class="b">_LINUX_SUSPEND_H</span></a>
<a name="3" /><span class="True">       3:</span> 
<a name="4" /><span class="True">       4:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="b">linux</span><span class="f">/</span><a href="cpu.c_macros_noref.html#_c3dhcF8w"><span class="b">swap</span></a><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="5" /><span class="True">       5:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="b">linux</span><span class="f">/</span><span class="b">notifier</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="6" /><span class="True">       6:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="b">linux</span><span class="f">/</span><span class="b">init</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="7" /><span class="True">       7:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="b">linux</span><span class="f">/</span><span class="b">pm</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="8" /><span class="True">       8:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="b">linux</span><span class="f">/</span><span class="b">mm</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="9" /><span class="True">       9:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="b">linux</span><span class="f">/</span><span class="b">freezer</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="10" /><span class="True">      10:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="m">asm</span><span class="f">/</span><span class="b">errno</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="11" /><span class="True">      11:</span> 
<a name="12" /><span class="True">      12:</span> <span class="f">#</span><span class="n">ifdef</span> <a href="cpu.c_macros_ref.html#_Q09ORklHX1ZUXzA_"><span class="b">CONFIG_VT</span></a>
<a name="13" /><span class="True">      13:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">pm_set_vt_switch</span><span class="f">(</span><span class="m">int</span><span class="f">)</span><span class="f">;</span>
<a name="14" /><span class="False">      14:</span> <span class="f">#</span><span class="n">else</span>
<a name="15" /><span class="False">      15:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">pm_set_vt_switch</span><span class="f">(</span><span class="m">int</span> <span class="b">do_switch</span><span class="f">)</span>
<a name="16" /><span class="False">      16:</span> <span class="f">{</span>
<a name="17" /><span class="False">      17:</span> <span class="f">}</span>
<a name="18" /><span class="True">      18:</span> <span class="f">#</span><span class="n">endif</span>
<a name="19" /><span class="True">      19:</span> 
<a name="20" /><span class="True">      20:</span> <span class="f">#</span><span class="n">ifdef</span> <a href="cpu.c_macros_ref.html#_Q09ORklHX1ZUX0NPTlNPTEVfU0xFRVBfMA__"><span class="b">CONFIG_VT_CONSOLE_SLEEP</span></a>
<a name="21" /><span class="True">      21:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">pm_prepare_console</span><span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">;</span>
<a name="22" /><span class="True">      22:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">pm_restore_console</span><span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">;</span>
<a name="23" /><span class="False">      23:</span> <span class="f">#</span><span class="n">else</span>
<a name="24" /><span class="False">      24:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">pm_prepare_console</span><span class="f">(</span><span class="m">void</span><span class="f">)</span>
<a name="25" /><span class="False">      25:</span> <span class="f">{</span>
<a name="26" /><span class="False">      26:</span>     <span class="m">return</span> <span class="c">0</span><span class="f">;</span>
<a name="27" /><span class="False">      27:</span> <span class="f">}</span>
<a name="28" /><span class="False">      28:</span> 
<a name="29" /><span class="False">      29:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">pm_restore_console</span><span class="f">(</span><span class="m">void</span><span class="f">)</span>
<a name="30" /><span class="False">      30:</span> <span class="f">{</span>
<a name="31" /><span class="False">      31:</span> <span class="f">}</span>
<a name="32" /><span class="True">      32:</span> <span class="f">#</span><span class="n">endif</span>
<a name="33" /><span class="True">      33:</span> 
<a name="34" /><span class="True">      34:</span> <span class="m">typedef</span> <span class="m">int</span> <a href="cpu.c_macros_ref.html#_X19iaXR3aXNlXzA_"><span class="b">__bitwise</span></a> <span class="b">suspend_state_t</span><span class="f">;</span>
<a name="35" /><span class="True">      35:</span> 
<a name="36" /><span class="True">      36:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_UE1fU1VTUEVORF9PTl8w"><span class="b">PM_SUSPEND_ON</span></a>        <span class="f">(</span><span class="f">(</span><a href="cpu.c_macros_ref.html#_X19mb3JjZV8w"><span class="b">__force</span></a> <span class="b">suspend_state_t</span><span class="f">)</span> <span class="c">0</span><span class="f">)</span>
<a name="37" /><span class="True">      37:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_UE1fU1VTUEVORF9GUkVFWkVfMA__"><span class="b">PM_SUSPEND_FREEZE</span></a>    <span class="f">(</span><span class="f">(</span><a href="cpu.c_macros_ref.html#_X19mb3JjZV8w"><span class="b">__force</span></a> <span class="b">suspend_state_t</span><span class="f">)</span> <span class="c">1</span><span class="f">)</span>
<a name="38" /><span class="True">      38:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_UE1fU1VTUEVORF9TVEFOREJZXzA_"><span class="b">PM_SUSPEND_STANDBY</span></a>    <span class="f">(</span><span class="f">(</span><a href="cpu.c_macros_ref.html#_X19mb3JjZV8w"><span class="b">__force</span></a> <span class="b">suspend_state_t</span><span class="f">)</span> <span class="c">2</span><span class="f">)</span>
<a name="39" /><span class="True">      39:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_UE1fU1VTUEVORF9NRU1fMA__"><span class="b">PM_SUSPEND_MEM</span></a>        <span class="f">(</span><span class="f">(</span><a href="cpu.c_macros_ref.html#_X19mb3JjZV8w"><span class="b">__force</span></a> <span class="b">suspend_state_t</span><span class="f">)</span> <span class="c">3</span><span class="f">)</span>
<a name="40" /><span class="True">      40:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_UE1fU1VTUEVORF9NSU5fMA__"><span class="b">PM_SUSPEND_MIN</span></a>        <a href="cpu.c_macros_noref.html#_UE1fU1VTUEVORF9GUkVFWkVfMA__"><span class="b">PM_SUSPEND_FREEZE</span></a>
<a name="41" /><span class="True">      41:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_UE1fU1VTUEVORF9NQVhfMA__"><span class="b">PM_SUSPEND_MAX</span></a>        <span class="f">(</span><span class="f">(</span><a href="cpu.c_macros_ref.html#_X19mb3JjZV8w"><span class="b">__force</span></a> <span class="b">suspend_state_t</span><span class="f">)</span> <span class="c">4</span><span class="f">)</span>
<a name="42" /><span class="True">      42:</span> 
<a name="43" /><span class="True">      43:</span> <span class="m">enum</span> <span class="b">suspend_stat_step</span> <span class="f">{</span>
<a name="44" /><span class="True">      44:</span>     <span class="b">SUSPEND_FREEZE</span> <span class="f">=</span> <span class="c">1</span><span class="f">,</span>
<a name="45" /><span class="True">      45:</span>     <span class="b">SUSPEND_PREPARE</span><span class="f">,</span>
<a name="46" /><span class="True">      46:</span>     <span class="b">SUSPEND_SUSPEND</span><span class="f">,</span>
<a name="47" /><span class="True">      47:</span>     <span class="b">SUSPEND_SUSPEND_LATE</span><span class="f">,</span>
<a name="48" /><span class="True">      48:</span>     <span class="b">SUSPEND_SUSPEND_NOIRQ</span><span class="f">,</span>
<a name="49" /><span class="True">      49:</span>     <span class="b">SUSPEND_RESUME_NOIRQ</span><span class="f">,</span>
<a name="50" /><span class="True">      50:</span>     <span class="b">SUSPEND_RESUME_EARLY</span><span class="f">,</span>
<a name="51" /><span class="True">      51:</span>     <span class="b">SUSPEND_RESUME</span>
<a name="52" /><span class="True">      52:</span> <span class="f">}</span><span class="f">;</span>
<a name="53" /><span class="True">      53:</span> 
<a name="54" /><span class="True">      54:</span> <span class="m">struct</span> <span class="b">suspend_stats</span> <span class="f">{</span>
<a name="55" /><span class="True">      55:</span>     <span class="m">int</span>    <span class="b">success</span><span class="f">;</span>
<a name="56" /><span class="True">      56:</span>     <span class="m">int</span>    <span class="b">fail</span><span class="f">;</span>
<a name="57" /><span class="True">      57:</span>     <span class="m">int</span>    <span class="b">failed_freeze</span><span class="f">;</span>
<a name="58" /><span class="True">      58:</span>     <span class="m">int</span>    <span class="b">failed_prepare</span><span class="f">;</span>
<a name="59" /><span class="True">      59:</span>     <span class="m">int</span>    <span class="b">failed_suspend</span><span class="f">;</span>
<a name="60" /><span class="True">      60:</span>     <span class="m">int</span>    <span class="b">failed_suspend_late</span><span class="f">;</span>
<a name="61" /><span class="True">      61:</span>     <span class="m">int</span>    <span class="b">failed_suspend_noirq</span><span class="f">;</span>
<a name="62" /><span class="True">      62:</span>     <span class="m">int</span>    <span class="b">failed_resume</span><span class="f">;</span>
<a name="63" /><span class="True">      63:</span>     <span class="m">int</span>    <span class="b">failed_resume_early</span><span class="f">;</span>
<a name="64" /><span class="True">      64:</span>     <span class="m">int</span>    <span class="b">failed_resume_noirq</span><span class="f">;</span>
<a name="65" /><span class="True">      65:</span> <span class="f">#</span><span class="n">define</span>    <a href="cpu.c_macros_ref.html#_UkVDX0ZBSUxFRF9OVU1fMA__"><span class="b">REC_FAILED_NUM</span></a>    <span class="c">2</span>
<a name="66" /><span class="True">      66:</span>     <span class="m">int</span>    <span class="b">last_failed_dev</span><span class="f">;</span>
<a name="67" /><span class="True">      67:</span>     <span class="m">char</span>    <span class="b">failed_devs</span><span class="f">[</span><a href="cpu.c_macros_ref.html#_UkVDX0ZBSUxFRF9OVU1fMA__"><span class="b">REC_FAILED_NUM</span></a><span class="f">]</span><span class="f">[</span><span class="c">40</span><span class="f">]</span><span class="f">;</span>
<a name="68" /><span class="True">      68:</span>     <span class="m">int</span>    <span class="b">last_failed_errno</span><span class="f">;</span>
<a name="69" /><span class="True">      69:</span>     <span class="m">int</span>    <span class="b">errno</span><span class="f">[</span><a href="cpu.c_macros_ref.html#_UkVDX0ZBSUxFRF9OVU1fMA__"><span class="b">REC_FAILED_NUM</span></a><span class="f">]</span><span class="f">;</span>
<a name="70" /><span class="True">      70:</span>     <span class="m">int</span>    <span class="b">last_failed_step</span><span class="f">;</span>
<a name="71" /><span class="True">      71:</span>     <span class="m">enum</span> <span class="b">suspend_stat_step</span>    <span class="b">failed_steps</span><span class="f">[</span><a href="cpu.c_macros_ref.html#_UkVDX0ZBSUxFRF9OVU1fMA__"><span class="b">REC_FAILED_NUM</span></a><span class="f">]</span><span class="f">;</span>
<a name="72" /><span class="True">      72:</span> <span class="f">}</span><span class="f">;</span>
<a name="73" /><span class="True">      73:</span> 
<a name="74" /><span class="True">      74:</span> <span class="m">extern</span> <span class="m">struct</span> <span class="b">suspend_stats</span> <span class="b">suspend_stats</span><span class="f">;</span>
<a name="75" /><span class="True">      75:</span> 
<a name="76" /><span class="True">      76:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">dpm_save_failed_dev</span><span class="f">(</span><span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="b">name</span><span class="f">)</span>
<a name="77" /><span class="True">      77:</span> <span class="f">{</span>
<a name="78" /><span class="True">      78:</span>     <span class="b">strlcpy</span><span class="f">(</span><span class="b">suspend_stats</span><span class="f">.</span><span class="b">failed_devs</span><span class="f">[</span><span class="b">suspend_stats</span><span class="f">.</span><span class="b">last_failed_dev</span><span class="f">]</span><span class="f">,</span>
<a name="79" /><span class="True">      79:</span>         <span class="b">name</span><span class="f">,</span>
<a name="80" /><span class="True">      80:</span>         <span class="m">sizeof</span><span class="f">(</span><span class="b">suspend_stats</span><span class="f">.</span><span class="b">failed_devs</span><span class="f">[</span><span class="c">0</span><span class="f">]</span><span class="f">)</span><span class="f">)</span><span class="f">;</span>
<a name="81" /><span class="True">      81:</span>     <span class="b">suspend_stats</span><span class="f">.</span><span class="b">last_failed_dev</span><span class="f">++</span><span class="f">;</span>
<a name="82" /><span class="True">      82:</span>     <span class="b">suspend_stats</span><span class="f">.</span><span class="b">last_failed_dev</span> <span class="f">%=</span> <a href="cpu.c_macros_ref.html#_UkVDX0ZBSUxFRF9OVU1fMA__"><span class="b">REC_FAILED_NUM</span></a><span class="f">;</span>
<a name="83" /><span class="True">      83:</span> <span class="f">}</span>
<a name="84" /><span class="True">      84:</span> 
<a name="85" /><span class="True">      85:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">dpm_save_failed_errno</span><span class="f">(</span><span class="m">int</span> <span class="b">err</span><span class="f">)</span>
<a name="86" /><span class="True">      86:</span> <span class="f">{</span>
<a name="87" /><span class="True">      87:</span>     <span class="b">suspend_stats</span><span class="f">.</span><span class="b">errno</span><span class="f">[</span><span class="b">suspend_stats</span><span class="f">.</span><span class="b">last_failed_errno</span><span class="f">]</span> <span class="f">=</span> <span class="b">err</span><span class="f">;</span>
<a name="88" /><span class="True">      88:</span>     <span class="b">suspend_stats</span><span class="f">.</span><span class="b">last_failed_errno</span><span class="f">++</span><span class="f">;</span>
<a name="89" /><span class="True">      89:</span>     <span class="b">suspend_stats</span><span class="f">.</span><span class="b">last_failed_errno</span> <span class="f">%=</span> <a href="cpu.c_macros_ref.html#_UkVDX0ZBSUxFRF9OVU1fMA__"><span class="b">REC_FAILED_NUM</span></a><span class="f">;</span>
<a name="90" /><span class="True">      90:</span> <span class="f">}</span>
<a name="91" /><span class="True">      91:</span> 
<a name="92" /><span class="True">      92:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">dpm_save_failed_step</span><span class="f">(</span><span class="m">enum</span> <span class="b">suspend_stat_step</span> <span class="b">step</span><span class="f">)</span>
<a name="93" /><span class="True">      93:</span> <span class="f">{</span>
<a name="94" /><span class="True">      94:</span>     <span class="b">suspend_stats</span><span class="f">.</span><span class="b">failed_steps</span><span class="f">[</span><span class="b">suspend_stats</span><span class="f">.</span><span class="b">last_failed_step</span><span class="f">]</span> <span class="f">=</span> <span class="b">step</span><span class="f">;</span>
<a name="95" /><span class="True">      95:</span>     <span class="b">suspend_stats</span><span class="f">.</span><span class="b">last_failed_step</span><span class="f">++</span><span class="f">;</span>
<a name="96" /><span class="True">      96:</span>     <span class="b">suspend_stats</span><span class="f">.</span><span class="b">last_failed_step</span> <span class="f">%=</span> <a href="cpu.c_macros_ref.html#_UkVDX0ZBSUxFRF9OVU1fMA__"><span class="b">REC_FAILED_NUM</span></a><span class="f">;</span>
<a name="97" /><span class="True">      97:</span> <span class="f">}</span>
<a name="98" /><span class="True">      98:</span> 
<a name="99" /><span class="True">      99:</span> <span class="k">/**</span>
<a name="100" /><span class="True">     100:</span> <span class="k"> * struct platform_suspend_ops - Callbacks for managing platform dependent</span>
<a name="101" /><span class="True">     101:</span> <span class="k"> *    system sleep states.</span>
<a name="102" /><span class="True">     102:</span> <span class="k"> *</span>
<a name="103" /><span class="True">     103:</span> <span class="k"> * @valid: Callback to determine if given system sleep state is supported by</span>
<a name="104" /><span class="True">     104:</span> <span class="k"> *    the platform.</span>
<a name="105" /><span class="True">     105:</span> <span class="k"> *    Valid (ie. supported) states are advertised in /sys/power/state.  Note</span>
<a name="106" /><span class="True">     106:</span> <span class="k"> *    that it still may be impossible to enter given system sleep state if the</span>
<a name="107" /><span class="True">     107:</span> <span class="k"> *    conditions aren&apos;t right.</span>
<a name="108" /><span class="True">     108:</span> <span class="k"> *    There is the %suspend_valid_only_mem function available that can be</span>
<a name="109" /><span class="True">     109:</span> <span class="k"> *    assigned to this if the platform only supports mem sleep.</span>
<a name="110" /><span class="True">     110:</span> <span class="k"> *</span>
<a name="111" /><span class="True">     111:</span> <span class="k"> * @begin: Initialise a transition to given system sleep state.</span>
<a name="112" /><span class="True">     112:</span> <span class="k"> *    @begin() is executed right prior to suspending devices.  The information</span>
<a name="113" /><span class="True">     113:</span> <span class="k"> *    conveyed to the platform code by @begin() should be disregarded by it as</span>
<a name="114" /><span class="True">     114:</span> <span class="k"> *    soon as @end() is executed.  If @begin() fails (ie. returns nonzero),</span>
<a name="115" /><span class="True">     115:</span> <span class="k"> *    @prepare(), @enter() and @finish() will not be called by the PM core.</span>
<a name="116" /><span class="True">     116:</span> <span class="k"> *    This callback is optional.  However, if it is implemented, the argument</span>
<a name="117" /><span class="True">     117:</span> <span class="k"> *    passed to @enter() is redundant and should be ignored.</span>
<a name="118" /><span class="True">     118:</span> <span class="k"> *</span>
<a name="119" /><span class="True">     119:</span> <span class="k"> * @prepare: Prepare the platform for entering the system sleep state indicated</span>
<a name="120" /><span class="True">     120:</span> <span class="k"> *    by @begin().</span>
<a name="121" /><span class="True">     121:</span> <span class="k"> *    @prepare() is called right after devices have been suspended (ie. the</span>
<a name="122" /><span class="True">     122:</span> <span class="k"> *    appropriate .suspend() method has been executed for each device) and</span>
<a name="123" /><span class="True">     123:</span> <span class="k"> *    before device drivers&apos; late suspend callbacks are executed.  It returns</span>
<a name="124" /><span class="True">     124:</span> <span class="k"> *    0 on success or a negative error code otherwise, in which case the</span>
<a name="125" /><span class="True">     125:</span> <span class="k"> *    system cannot enter the desired sleep state (@prepare_late(), @enter(),</span>
<a name="126" /><span class="True">     126:</span> <span class="k"> *    and @wake() will not be called in that case).</span>
<a name="127" /><span class="True">     127:</span> <span class="k"> *</span>
<a name="128" /><span class="True">     128:</span> <span class="k"> * @prepare_late: Finish preparing the platform for entering the system sleep</span>
<a name="129" /><span class="True">     129:</span> <span class="k"> *    state indicated by @begin().</span>
<a name="130" /><span class="True">     130:</span> <span class="k"> *    @prepare_late is called before disabling nonboot CPUs and after</span>
<a name="131" /><span class="True">     131:</span> <span class="k"> *    device drivers&apos; late suspend callbacks have been executed.  It returns</span>
<a name="132" /><span class="True">     132:</span> <span class="k"> *    0 on success or a negative error code otherwise, in which case the</span>
<a name="133" /><span class="True">     133:</span> <span class="k"> *    system cannot enter the desired sleep state (@enter() will not be</span>
<a name="134" /><span class="True">     134:</span> <span class="k"> *    executed).</span>
<a name="135" /><span class="True">     135:</span> <span class="k"> *</span>
<a name="136" /><span class="True">     136:</span> <span class="k"> * @enter: Enter the system sleep state indicated by @begin() or represented by</span>
<a name="137" /><span class="True">     137:</span> <span class="k"> *    the argument if @begin() is not implemented.</span>
<a name="138" /><span class="True">     138:</span> <span class="k"> *    This callback is mandatory.  It returns 0 on success or a negative</span>
<a name="139" /><span class="True">     139:</span> <span class="k"> *    error code otherwise, in which case the system cannot enter the desired</span>
<a name="140" /><span class="True">     140:</span> <span class="k"> *    sleep state.</span>
<a name="141" /><span class="True">     141:</span> <span class="k"> *</span>
<a name="142" /><span class="True">     142:</span> <span class="k"> * @wake: Called when the system has just left a sleep state, right after</span>
<a name="143" /><span class="True">     143:</span> <span class="k"> *    the nonboot CPUs have been enabled and before device drivers&apos; early</span>
<a name="144" /><span class="True">     144:</span> <span class="k"> *    resume callbacks are executed.</span>
<a name="145" /><span class="True">     145:</span> <span class="k"> *    This callback is optional, but should be implemented by the platforms</span>
<a name="146" /><span class="True">     146:</span> <span class="k"> *    that implement @prepare_late().  If implemented, it is always called</span>
<a name="147" /><span class="True">     147:</span> <span class="k"> *    after @prepare_late and @enter(), even if one of them fails.</span>
<a name="148" /><span class="True">     148:</span> <span class="k"> *</span>
<a name="149" /><span class="True">     149:</span> <span class="k"> * @finish: Finish wake-up of the platform.</span>
<a name="150" /><span class="True">     150:</span> <span class="k"> *    @finish is called right prior to calling device drivers&apos; regular suspend</span>
<a name="151" /><span class="True">     151:</span> <span class="k"> *    callbacks.</span>
<a name="152" /><span class="True">     152:</span> <span class="k"> *    This callback is optional, but should be implemented by the platforms</span>
<a name="153" /><span class="True">     153:</span> <span class="k"> *    that implement @prepare().  If implemented, it is always called after</span>
<a name="154" /><span class="True">     154:</span> <span class="k"> *    @enter() and @wake(), even if any of them fails.  It is executed after</span>
<a name="155" /><span class="True">     155:</span> <span class="k"> *    a failing @prepare.</span>
<a name="156" /><span class="True">     156:</span> <span class="k"> *</span>
<a name="157" /><span class="True">     157:</span> <span class="k"> * @suspend_again: Returns whether the system should suspend again (true) or</span>
<a name="158" /><span class="True">     158:</span> <span class="k"> *    not (false). If the platform wants to poll sensors or execute some</span>
<a name="159" /><span class="True">     159:</span> <span class="k"> *    code during suspended without invoking userspace and most of devices,</span>
<a name="160" /><span class="True">     160:</span> <span class="k"> *    suspend_again callback is the place assuming that periodic-wakeup or</span>
<a name="161" /><span class="True">     161:</span> <span class="k"> *    alarm-wakeup is already setup. This allows to execute some codes while</span>
<a name="162" /><span class="True">     162:</span> <span class="k"> *    being kept suspended in the view of userland and devices.</span>
<a name="163" /><span class="True">     163:</span> <span class="k"> *</span>
<a name="164" /><span class="True">     164:</span> <span class="k"> * @end: Called by the PM core right after resuming devices, to indicate to</span>
<a name="165" /><span class="True">     165:</span> <span class="k"> *    the platform that the system has returned to the working state or</span>
<a name="166" /><span class="True">     166:</span> <span class="k"> *    the transition to the sleep state has been aborted.</span>
<a name="167" /><span class="True">     167:</span> <span class="k"> *    This callback is optional, but should be implemented by the platforms</span>
<a name="168" /><span class="True">     168:</span> <span class="k"> *    that implement @begin().  Accordingly, platforms implementing @begin()</span>
<a name="169" /><span class="True">     169:</span> <span class="k"> *    should also provide a @end() which cleans up transitions aborted before</span>
<a name="170" /><span class="True">     170:</span> <span class="k"> *    @enter().</span>
<a name="171" /><span class="True">     171:</span> <span class="k"> *</span>
<a name="172" /><span class="True">     172:</span> <span class="k"> * @recover: Recover the platform from a suspend failure.</span>
<a name="173" /><span class="True">     173:</span> <span class="k"> *    Called by the PM core if the suspending of devices fails.</span>
<a name="174" /><span class="True">     174:</span> <span class="k"> *    This callback is optional and should only be implemented by platforms</span>
<a name="175" /><span class="True">     175:</span> <span class="k"> *    which require special recovery actions in that situation.</span>
<a name="176" /><span class="True">     176:</span> <span class="k"> */</span>
<a name="177" /><span class="True">     177:</span> <span class="m">struct</span> <span class="b">platform_suspend_ops</span> <span class="f">{</span>
<a name="178" /><span class="True">     178:</span>     <span class="m">int</span> <span class="f">(</span><span class="f">*</span><span class="b">valid</span><span class="f">)</span><span class="f">(</span><span class="b">suspend_state_t</span> <span class="b">state</span><span class="f">)</span><span class="f">;</span>
<a name="179" /><span class="True">     179:</span>     <span class="m">int</span> <span class="f">(</span><span class="f">*</span><span class="b">begin</span><span class="f">)</span><span class="f">(</span><span class="b">suspend_state_t</span> <span class="b">state</span><span class="f">)</span><span class="f">;</span>
<a name="180" /><span class="True">     180:</span>     <span class="m">int</span> <span class="f">(</span><span class="f">*</span><span class="b">prepare</span><span class="f">)</span><span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">;</span>
<a name="181" /><span class="True">     181:</span>     <span class="m">int</span> <span class="f">(</span><span class="f">*</span><span class="b">prepare_late</span><span class="f">)</span><span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">;</span>
<a name="182" /><span class="True">     182:</span>     <span class="m">int</span> <span class="f">(</span><span class="f">*</span><span class="b">enter</span><span class="f">)</span><span class="f">(</span><span class="b">suspend_state_t</span> <span class="b">state</span><span class="f">)</span><span class="f">;</span>
<a name="183" /><span class="True">     183:</span>     <span class="m">void</span> <span class="f">(</span><span class="f">*</span><span class="b">wake</span><span class="f">)</span><span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">;</span>
<a name="184" /><span class="True">     184:</span>     <span class="m">void</span> <span class="f">(</span><span class="f">*</span><span class="b">finish</span><span class="f">)</span><span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">;</span>
<a name="185" /><span class="True">     185:</span>     <span class="m">bool</span> <span class="f">(</span><span class="f">*</span><span class="b">suspend_again</span><span class="f">)</span><span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">;</span>
<a name="186" /><span class="True">     186:</span>     <span class="m">void</span> <span class="f">(</span><span class="f">*</span><span class="b">end</span><span class="f">)</span><span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">;</span>
<a name="187" /><span class="True">     187:</span>     <span class="m">void</span> <span class="f">(</span><span class="f">*</span><span class="b">recover</span><span class="f">)</span><span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">;</span>
<a name="188" /><span class="True">     188:</span> <span class="f">}</span><span class="f">;</span>
<a name="189" /><span class="True">     189:</span> 
<a name="190" /><span class="True">     190:</span> <span class="f">#</span><span class="n">ifdef</span> <a href="cpu.c_macros_ref.html#_Q09ORklHX1NVU1BFTkRfMA__"><span class="b">CONFIG_SUSPEND</span></a>
<a name="191" /><span class="True">     191:</span> <span class="k">/**</span>
<a name="192" /><span class="True">     192:</span> <span class="k"> * suspend_set_ops - set platform dependent suspend operations</span>
<a name="193" /><span class="True">     193:</span> <span class="k"> * @ops: The new suspend operations to set.</span>
<a name="194" /><span class="True">     194:</span> <span class="k"> */</span>
<a name="195" /><span class="True">     195:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">suspend_set_ops</span><span class="f">(</span><span class="m">const</span> <span class="m">struct</span> <span class="b">platform_suspend_ops</span> <span class="f">*</span><span class="b">ops</span><span class="f">)</span><span class="f">;</span>
<a name="196" /><span class="True">     196:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">suspend_valid_only_mem</span><span class="f">(</span><span class="b">suspend_state_t</span> <span class="b">state</span><span class="f">)</span><span class="f">;</span>
<a name="197" /><span class="True">     197:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">freeze_wake</span><span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">;</span>
<a name="198" /><span class="True">     198:</span> 
<a name="199" /><span class="True">     199:</span> <span class="k">/**</span>
<a name="200" /><span class="True">     200:</span> <span class="k"> * arch_suspend_disable_irqs - disable IRQs for suspend</span>
<a name="201" /><span class="True">     201:</span> <span class="k"> *</span>
<a name="202" /><span class="True">     202:</span> <span class="k"> * Disables IRQs (in the default case). This is a weak symbol in the common</span>
<a name="203" /><span class="True">     203:</span> <span class="k"> * code and thus allows architectures to override it if more needs to be</span>
<a name="204" /><span class="True">     204:</span> <span class="k"> * done. Not called for suspend to disk.</span>
<a name="205" /><span class="True">     205:</span> <span class="k"> */</span>
<a name="206" /><span class="True">     206:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">arch_suspend_disable_irqs</span><span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">;</span>
<a name="207" /><span class="True">     207:</span> 
<a name="208" /><span class="True">     208:</span> <span class="k">/**</span>
<a name="209" /><span class="True">     209:</span> <span class="k"> * arch_suspend_enable_irqs - enable IRQs after suspend</span>
<a name="210" /><span class="True">     210:</span> <span class="k"> *</span>
<a name="211" /><span class="True">     211:</span> <span class="k"> * Enables IRQs (in the default case). This is a weak symbol in the common</span>
<a name="212" /><span class="True">     212:</span> <span class="k"> * code and thus allows architectures to override it if more needs to be</span>
<a name="213" /><span class="True">     213:</span> <span class="k"> * done. Not called for suspend to disk.</span>
<a name="214" /><span class="True">     214:</span> <span class="k"> */</span>
<a name="215" /><span class="True">     215:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">arch_suspend_enable_irqs</span><span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">;</span>
<a name="216" /><span class="True">     216:</span> 
<a name="217" /><span class="True">     217:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">pm_suspend</span><span class="f">(</span><span class="b">suspend_state_t</span> <span class="b">state</span><span class="f">)</span><span class="f">;</span>
<a name="218" /><span class="False">     218:</span> <span class="f">#</span><span class="n">else</span> <span class="k">/* !CONFIG_SUSPEND */</span>
<a name="219" /><span class="False">     219:</span> <span class="f">#</span><span class="n">define</span> <span class="b">suspend_valid_only_mem</span>    <a href="cpu.c_macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a>
<a name="220" /><span class="False">     220:</span> 
<a name="221" /><span class="False">     221:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">suspend_set_ops</span><span class="f">(</span><span class="m">const</span> <span class="m">struct</span> <span class="b">platform_suspend_ops</span> <span class="f">*</span><span class="b">ops</span><span class="f">)</span> <span class="f">{</span><span class="f">}</span>
<a name="222" /><span class="False">     222:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">pm_suspend</span><span class="f">(</span><span class="b">suspend_state_t</span> <span class="b">state</span><span class="f">)</span> <span class="f">{</span> <span class="m">return</span> <span class="f">-</span><a href="cpu.c_macros_ref.html#_RU5PU1lTXzA_"><span class="b">ENOSYS</span></a><span class="f">;</span> <span class="f">}</span>
<a name="223" /><span class="False">     223:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">freeze_wake</span><span class="f">(</span><span class="m">void</span><span class="f">)</span> <span class="f">{</span><span class="f">}</span>
<a name="224" /><span class="True">     224:</span> <span class="f">#</span><span class="n">endif</span> <span class="k">/* !CONFIG_SUSPEND */</span>
<a name="225" /><span class="True">     225:</span> 
<a name="226" /><span class="True">     226:</span> <span class="k">/* struct pbe is used for creating lists of pages that should be restored</span>
<a name="227" /><span class="True">     227:</span> <span class="k"> * atomically during the resume from disk, because the page frames they have</span>
<a name="228" /><span class="True">     228:</span> <span class="k"> * occupied before the suspend are in use.</span>
<a name="229" /><span class="True">     229:</span> <span class="k"> */</span>
<a name="230" /><span class="True">     230:</span> <span class="m">struct</span> <span class="b">pbe</span> <span class="f">{</span>
<a name="231" /><span class="True">     231:</span>     <span class="m">void</span> <span class="f">*</span><span class="b">address</span><span class="f">;</span>        <span class="k">/* address of the copy */</span>
<a name="232" /><span class="True">     232:</span>     <span class="m">void</span> <span class="f">*</span><span class="b">orig_address</span><span class="f">;</span>    <span class="k">/* original address of a page */</span>
<a name="233" /><span class="True">     233:</span>     <span class="m">struct</span> <span class="b">pbe</span> <span class="f">*</span><span class="b">next</span><span class="f">;</span>
<a name="234" /><span class="True">     234:</span> <span class="f">}</span><span class="f">;</span>
<a name="235" /><span class="True">     235:</span> 
<a name="236" /><span class="True">     236:</span> <span class="k">/* mm/page_alloc.c */</span>
<a name="237" /><span class="True">     237:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">mark_free_pages</span><span class="f">(</span><span class="m">struct</span> <span class="b">zone</span> <span class="f">*</span><span class="b">zone</span><span class="f">)</span><span class="f">;</span>
<a name="238" /><span class="True">     238:</span> 
<a name="239" /><span class="True">     239:</span> <span class="k">/**</span>
<a name="240" /><span class="True">     240:</span> <span class="k"> * struct platform_hibernation_ops - hibernation platform support</span>
<a name="241" /><span class="True">     241:</span> <span class="k"> *</span>
<a name="242" /><span class="True">     242:</span> <span class="k"> * The methods in this structure allow a platform to carry out special</span>
<a name="243" /><span class="True">     243:</span> <span class="k"> * operations required by it during a hibernation transition.</span>
<a name="244" /><span class="True">     244:</span> <span class="k"> *</span>
<a name="245" /><span class="True">     245:</span> <span class="k"> * All the methods below, except for @recover(), must be implemented.</span>
<a name="246" /><span class="True">     246:</span> <span class="k"> *</span>
<a name="247" /><span class="True">     247:</span> <span class="k"> * @begin: Tell the platform driver that we&apos;re starting hibernation.</span>
<a name="248" /><span class="True">     248:</span> <span class="k"> *    Called right after shrinking memory and before freezing devices.</span>
<a name="249" /><span class="True">     249:</span> <span class="k"> *</span>
<a name="250" /><span class="True">     250:</span> <span class="k"> * @end: Called by the PM core right after resuming devices, to indicate to</span>
<a name="251" /><span class="True">     251:</span> <span class="k"> *    the platform that the system has returned to the working state.</span>
<a name="252" /><span class="True">     252:</span> <span class="k"> *</span>
<a name="253" /><span class="True">     253:</span> <span class="k"> * @pre_snapshot: Prepare the platform for creating the hibernation image.</span>
<a name="254" /><span class="True">     254:</span> <span class="k"> *    Called right after devices have been frozen and before the nonboot</span>
<a name="255" /><span class="True">     255:</span> <span class="k"> *    CPUs are disabled (runs with IRQs on).</span>
<a name="256" /><span class="True">     256:</span> <span class="k"> *</span>
<a name="257" /><span class="True">     257:</span> <span class="k"> * @finish: Restore the previous state of the platform after the hibernation</span>
<a name="258" /><span class="True">     258:</span> <span class="k"> *    image has been created *or* put the platform into the normal operation</span>
<a name="259" /><span class="True">     259:</span> <span class="k"> *    mode after the hibernation (the same method is executed in both cases).</span>
<a name="260" /><span class="True">     260:</span> <span class="k"> *    Called right after the nonboot CPUs have been enabled and before</span>
<a name="261" /><span class="True">     261:</span> <span class="k"> *    thawing devices (runs with IRQs on).</span>
<a name="262" /><span class="True">     262:</span> <span class="k"> *</span>
<a name="263" /><span class="True">     263:</span> <span class="k"> * @prepare: Prepare the platform for entering the low power state.</span>
<a name="264" /><span class="True">     264:</span> <span class="k"> *    Called right after the hibernation image has been saved and before</span>
<a name="265" /><span class="True">     265:</span> <span class="k"> *    devices are prepared for entering the low power state.</span>
<a name="266" /><span class="True">     266:</span> <span class="k"> *</span>
<a name="267" /><span class="True">     267:</span> <span class="k"> * @enter: Put the system into the low power state after the hibernation image</span>
<a name="268" /><span class="True">     268:</span> <span class="k"> *    has been saved to disk.</span>
<a name="269" /><span class="True">     269:</span> <span class="k"> *    Called after the nonboot CPUs have been disabled and all of the low</span>
<a name="270" /><span class="True">     270:</span> <span class="k"> *    level devices have been shut down (runs with IRQs off).</span>
<a name="271" /><span class="True">     271:</span> <span class="k"> *</span>
<a name="272" /><span class="True">     272:</span> <span class="k"> * @leave: Perform the first stage of the cleanup after the system sleep state</span>
<a name="273" /><span class="True">     273:</span> <span class="k"> *    indicated by @set_target() has been left.</span>
<a name="274" /><span class="True">     274:</span> <span class="k"> *    Called right after the control has been passed from the boot kernel to</span>
<a name="275" /><span class="True">     275:</span> <span class="k"> *    the image kernel, before the nonboot CPUs are enabled and before devices</span>
<a name="276" /><span class="True">     276:</span> <span class="k"> *    are resumed.  Executed with interrupts disabled.</span>
<a name="277" /><span class="True">     277:</span> <span class="k"> *</span>
<a name="278" /><span class="True">     278:</span> <span class="k"> * @pre_restore: Prepare system for the restoration from a hibernation image.</span>
<a name="279" /><span class="True">     279:</span> <span class="k"> *    Called right after devices have been frozen and before the nonboot</span>
<a name="280" /><span class="True">     280:</span> <span class="k"> *    CPUs are disabled (runs with IRQs on).</span>
<a name="281" /><span class="True">     281:</span> <span class="k"> *</span>
<a name="282" /><span class="True">     282:</span> <span class="k"> * @restore_cleanup: Clean up after a failing image restoration.</span>
<a name="283" /><span class="True">     283:</span> <span class="k"> *    Called right after the nonboot CPUs have been enabled and before</span>
<a name="284" /><span class="True">     284:</span> <span class="k"> *    thawing devices (runs with IRQs on).</span>
<a name="285" /><span class="True">     285:</span> <span class="k"> *</span>
<a name="286" /><span class="True">     286:</span> <span class="k"> * @recover: Recover the platform from a failure to suspend devices.</span>
<a name="287" /><span class="True">     287:</span> <span class="k"> *    Called by the PM core if the suspending of devices during hibernation</span>
<a name="288" /><span class="True">     288:</span> <span class="k"> *    fails.  This callback is optional and should only be implemented by</span>
<a name="289" /><span class="True">     289:</span> <span class="k"> *    platforms which require special recovery actions in that situation.</span>
<a name="290" /><span class="True">     290:</span> <span class="k"> */</span>
<a name="291" /><span class="True">     291:</span> <span class="m">struct</span> <span class="b">platform_hibernation_ops</span> <span class="f">{</span>
<a name="292" /><span class="True">     292:</span>     <span class="m">int</span> <span class="f">(</span><span class="f">*</span><span class="b">begin</span><span class="f">)</span><span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">;</span>
<a name="293" /><span class="True">     293:</span>     <span class="m">void</span> <span class="f">(</span><span class="f">*</span><span class="b">end</span><span class="f">)</span><span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">;</span>
<a name="294" /><span class="True">     294:</span>     <span class="m">int</span> <span class="f">(</span><span class="f">*</span><span class="b">pre_snapshot</span><span class="f">)</span><span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">;</span>
<a name="295" /><span class="True">     295:</span>     <span class="m">void</span> <span class="f">(</span><span class="f">*</span><span class="b">finish</span><span class="f">)</span><span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">;</span>
<a name="296" /><span class="True">     296:</span>     <span class="m">int</span> <span class="f">(</span><span class="f">*</span><span class="b">prepare</span><span class="f">)</span><span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">;</span>
<a name="297" /><span class="True">     297:</span>     <span class="m">int</span> <span class="f">(</span><span class="f">*</span><span class="b">enter</span><span class="f">)</span><span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">;</span>
<a name="298" /><span class="True">     298:</span>     <span class="m">void</span> <span class="f">(</span><span class="f">*</span><span class="b">leave</span><span class="f">)</span><span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">;</span>
<a name="299" /><span class="True">     299:</span>     <span class="m">int</span> <span class="f">(</span><span class="f">*</span><span class="b">pre_restore</span><span class="f">)</span><span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">;</span>
<a name="300" /><span class="True">     300:</span>     <span class="m">void</span> <span class="f">(</span><span class="f">*</span><span class="b">restore_cleanup</span><span class="f">)</span><span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">;</span>
<a name="301" /><span class="True">     301:</span>     <span class="m">void</span> <span class="f">(</span><span class="f">*</span><span class="b">recover</span><span class="f">)</span><span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">;</span>
<a name="302" /><span class="True">     302:</span> <span class="f">}</span><span class="f">;</span>
<a name="303" /><span class="True">     303:</span> 
<a name="304" /><span class="True">     304:</span> <span class="f">#</span><span class="n">ifdef</span> <a href="cpu.c_macros_ref.html#_Q09ORklHX0hJQkVSTkFUSU9OXzA_"><span class="b">CONFIG_HIBERNATION</span></a>
<a name="305" /><span class="True">     305:</span> <span class="k">/* kernel/power/snapshot.c */</span>
<a name="306" /><span class="True">     306:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">__register_nosave_region</span><span class="f">(</span><span class="m">unsigned</span> <span class="m">long</span> <span class="b">b</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">long</span> <span class="b">e</span><span class="f">,</span> <span class="m">int</span> <span class="b">km</span><span class="f">)</span><span class="f">;</span>
<a name="307" /><span class="True">     307:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <a href="cpu.c_macros_ref.html#_X19pbml0XzA_"><span class="b">__init</span></a> <span class="b">register_nosave_region</span><span class="f">(</span><span class="m">unsigned</span> <span class="m">long</span> <span class="b">b</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">long</span> <span class="b">e</span><span class="f">)</span>
<a name="308" /><span class="True">     308:</span> <span class="f">{</span>
<a name="309" /><span class="True">     309:</span>     <span class="b">__register_nosave_region</span><span class="f">(</span><span class="b">b</span><span class="f">,</span> <span class="b">e</span><span class="f">,</span> <span class="c">0</span><span class="f">)</span><span class="f">;</span>
<a name="310" /><span class="True">     310:</span> <span class="f">}</span>
<a name="311" /><span class="True">     311:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <a href="cpu.c_macros_ref.html#_X19pbml0XzA_"><span class="b">__init</span></a> <span class="b">register_nosave_region_late</span><span class="f">(</span><span class="m">unsigned</span> <span class="m">long</span> <span class="b">b</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">long</span> <span class="b">e</span><span class="f">)</span>
<a name="312" /><span class="True">     312:</span> <span class="f">{</span>
<a name="313" /><span class="True">     313:</span>     <span class="b">__register_nosave_region</span><span class="f">(</span><span class="b">b</span><span class="f">,</span> <span class="b">e</span><span class="f">,</span> <span class="c">1</span><span class="f">)</span><span class="f">;</span>
<a name="314" /><span class="True">     314:</span> <span class="f">}</span>
<a name="315" /><span class="True">     315:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">swsusp_page_is_forbidden</span><span class="f">(</span><span class="m">struct</span> <span class="b">page</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="316" /><span class="True">     316:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">swsusp_set_page_free</span><span class="f">(</span><span class="m">struct</span> <span class="b">page</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="317" /><span class="True">     317:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">swsusp_unset_page_free</span><span class="f">(</span><span class="m">struct</span> <span class="b">page</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="318" /><span class="True">     318:</span> <span class="m">extern</span> <span class="m">unsigned</span> <span class="m">long</span> <span class="b">get_safe_page</span><span class="f">(</span><span class="b">gfp_t</span> <span class="b">gfp_mask</span><span class="f">)</span><span class="f">;</span>
<a name="319" /><span class="True">     319:</span> 
<a name="320" /><span class="True">     320:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">hibernation_set_ops</span><span class="f">(</span><span class="m">const</span> <span class="m">struct</span> <span class="b">platform_hibernation_ops</span> <span class="f">*</span><span class="b">ops</span><span class="f">)</span><span class="f">;</span>
<a name="321" /><span class="True">     321:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">hibernate</span><span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">;</span>
<a name="322" /><span class="True">     322:</span> <span class="m">extern</span> <span class="m">bool</span> <span class="b">system_entering_hibernation</span><span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">;</span>
<a name="323" /><span class="False">     323:</span> <span class="f">#</span><span class="n">else</span> <span class="k">/* CONFIG_HIBERNATION */</span>
<a name="324" /><span class="False">     324:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">register_nosave_region</span><span class="f">(</span><span class="m">unsigned</span> <span class="m">long</span> <span class="b">b</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">long</span> <span class="b">e</span><span class="f">)</span> <span class="f">{</span><span class="f">}</span>
<a name="325" /><span class="False">     325:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">register_nosave_region_late</span><span class="f">(</span><span class="m">unsigned</span> <span class="m">long</span> <span class="b">b</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">long</span> <span class="b">e</span><span class="f">)</span> <span class="f">{</span><span class="f">}</span>
<a name="326" /><span class="False">     326:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">swsusp_page_is_forbidden</span><span class="f">(</span><span class="m">struct</span> <span class="b">page</span> <span class="f">*</span><span class="b">p</span><span class="f">)</span> <span class="f">{</span> <span class="m">return</span> <span class="c">0</span><span class="f">;</span> <span class="f">}</span>
<a name="327" /><span class="False">     327:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">swsusp_set_page_free</span><span class="f">(</span><span class="m">struct</span> <span class="b">page</span> <span class="f">*</span><span class="b">p</span><span class="f">)</span> <span class="f">{</span><span class="f">}</span>
<a name="328" /><span class="False">     328:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">swsusp_unset_page_free</span><span class="f">(</span><span class="m">struct</span> <span class="b">page</span> <span class="f">*</span><span class="b">p</span><span class="f">)</span> <span class="f">{</span><span class="f">}</span>
<a name="329" /><span class="False">     329:</span> 
<a name="330" /><span class="False">     330:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">hibernation_set_ops</span><span class="f">(</span><span class="m">const</span> <span class="m">struct</span> <span class="b">platform_hibernation_ops</span> <span class="f">*</span><span class="b">ops</span><span class="f">)</span> <span class="f">{</span><span class="f">}</span>
<a name="331" /><span class="False">     331:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">hibernate</span><span class="f">(</span><span class="m">void</span><span class="f">)</span> <span class="f">{</span> <span class="m">return</span> <span class="f">-</span><a href="cpu.c_macros_ref.html#_RU5PU1lTXzA_"><span class="b">ENOSYS</span></a><span class="f">;</span> <span class="f">}</span>
<a name="332" /><span class="False">     332:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">bool</span> <span class="b">system_entering_hibernation</span><span class="f">(</span><span class="m">void</span><span class="f">)</span> <span class="f">{</span> <span class="m">return</span> <span class="m">false</span><span class="f">;</span> <span class="f">}</span>
<a name="333" /><span class="True">     333:</span> <span class="f">#</span><span class="n">endif</span> <span class="k">/* CONFIG_HIBERNATION */</span>
<a name="334" /><span class="True">     334:</span> 
<a name="335" /><span class="True">     335:</span> <span class="k">/* Hibernation and suspend events */</span>
<a name="336" /><span class="True">     336:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_ref.html#_UE1fSElCRVJOQVRJT05fUFJFUEFSRV8w"><span class="b">PM_HIBERNATION_PREPARE</span></a>    <span class="c">0x0001</span> <span class="k">/* Going to hibernate */</span>
<a name="337" /><span class="True">     337:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_ref.html#_UE1fUE9TVF9ISUJFUk5BVElPTl8w"><span class="b">PM_POST_HIBERNATION</span></a>    <span class="c">0x0002</span> <span class="k">/* Hibernation finished */</span>
<a name="338" /><span class="True">     338:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_ref.html#_UE1fU1VTUEVORF9QUkVQQVJFXzA_"><span class="b">PM_SUSPEND_PREPARE</span></a>    <span class="c">0x0003</span> <span class="k">/* Going to suspend the system */</span>
<a name="339" /><span class="True">     339:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_ref.html#_UE1fUE9TVF9TVVNQRU5EXzA_"><span class="b">PM_POST_SUSPEND</span></a>        <span class="c">0x0004</span> <span class="k">/* Suspend finished */</span>
<a name="340" /><span class="True">     340:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_UE1fUkVTVE9SRV9QUkVQQVJFXzA_"><span class="b">PM_RESTORE_PREPARE</span></a>    <span class="c">0x0005</span> <span class="k">/* Going to restore a saved image */</span>
<a name="341" /><span class="True">     341:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_UE1fUE9TVF9SRVNUT1JFXzA_"><span class="b">PM_POST_RESTORE</span></a>        <span class="c">0x0006</span> <span class="k">/* Restore failed */</span>
<a name="342" /><span class="True">     342:</span> 
<a name="343" /><span class="True">     343:</span> <span class="m">extern</span> <span class="m">struct</span> <span class="b">mutex</span> <span class="b">pm_mutex</span><span class="f">;</span>
<a name="344" /><span class="True">     344:</span> 
<a name="345" /><span class="True">     345:</span> <span class="f">#</span><span class="n">ifdef</span> <a href="cpu.c_macros_ref.html#_Q09ORklHX1BNX1NMRUVQXzA_"><span class="b">CONFIG_PM_SLEEP</span></a>
<a name="346" /><span class="True">     346:</span> <span class="m">void</span> <span class="b">save_processor_state</span><span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">;</span>
<a name="347" /><span class="True">     347:</span> <span class="m">void</span> <span class="b">restore_processor_state</span><span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">;</span>
<a name="348" /><span class="True">     348:</span> 
<a name="349" /><span class="True">     349:</span> <span class="k">/* kernel/power/main.c */</span>
<a name="350" /><span class="True">     350:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">register_pm_notifier</span><span class="f">(</span><span class="m">struct</span> <span class="b">notifier_block</span> <span class="f">*</span><span class="b">nb</span><span class="f">)</span><span class="f">;</span>
<a name="351" /><span class="True">     351:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">unregister_pm_notifier</span><span class="f">(</span><span class="m">struct</span> <span class="b">notifier_block</span> <span class="f">*</span><span class="b">nb</span><span class="f">)</span><span class="f">;</span>
<a name="352" /><span class="True">     352:</span> 
<a name="353" /><span class="True">     353:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_ref.html#_cG1fbm90aWZpZXJfMA__"><span class="b">pm_notifier</span></a><span class="f">(</span><span class="b">fn</span><span class="f">,</span> <span class="b">pri</span><span class="f">)</span> <span class="f">{</span>                \
<a name="354" /><span class="True">     354:</span>     <span class="m">static</span> <span class="m">struct</span> <span class="b">notifier_block</span> <span class="b">fn</span><span class="f">##</span><span class="b">_nb</span> <span class="f">=</span>            \
<a name="355" /><span class="True">     355:</span>         <span class="f">{</span> <span class="f">.</span><span class="b">notifier_call</span> <span class="f">=</span> <span class="b">fn</span><span class="f">,</span> <span class="f">.</span><span class="b">priority</span> <span class="f">=</span> <span class="b">pri</span> <span class="f">}</span><span class="f">;</span>    \
<a name="356" /><span class="True">     356:</span>     <span class="b">register_pm_notifier</span><span class="f">(</span><span class="f">&amp;</span><span class="b">fn</span><span class="f">##</span><span class="b">_nb</span><span class="f">)</span><span class="f">;</span>            \
<a name="357" /><span class="True">     357:</span> <span class="f">}</span>
<a name="358" /><span class="True">     358:</span> 
<a name="359" /><span class="True">     359:</span> <span class="k">/* drivers/base/power/wakeup.c */</span>
<a name="360" /><span class="True">     360:</span> <span class="m">extern</span> <span class="m">bool</span> <span class="b">events_check_enabled</span><span class="f">;</span>
<a name="361" /><span class="True">     361:</span> 
<a name="362" /><span class="True">     362:</span> <span class="m">extern</span> <span class="m">bool</span> <span class="b">pm_wakeup_pending</span><span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">;</span>
<a name="363" /><span class="True">     363:</span> <span class="m">extern</span> <span class="m">bool</span> <span class="b">pm_get_wakeup_count</span><span class="f">(</span><span class="m">unsigned</span> <span class="m">int</span> <span class="f">*</span><span class="b">count</span><span class="f">,</span> <span class="m">bool</span> <span class="b">block</span><span class="f">)</span><span class="f">;</span>
<a name="364" /><span class="True">     364:</span> <span class="m">extern</span> <span class="m">bool</span> <span class="b">pm_save_wakeup_count</span><span class="f">(</span><span class="m">unsigned</span> <span class="m">int</span> <span class="b">count</span><span class="f">)</span><span class="f">;</span>
<a name="365" /><span class="True">     365:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">pm_wakep_autosleep_enabled</span><span class="f">(</span><span class="m">bool</span> <span class="b">set</span><span class="f">)</span><span class="f">;</span>
<a name="366" /><span class="True">     366:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">pm_print_active_wakeup_sources</span><span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">;</span>
<a name="367" /><span class="True">     367:</span> 
<a name="368" /><span class="True">     368:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">lock_system_sleep</span><span class="f">(</span><span class="m">void</span><span class="f">)</span>
<a name="369" /><span class="True">     369:</span> <span class="f">{</span>
<a name="370" /><span class="True">     370:</span>     <a href="cpu.c_macros_ref.html#_Y3VycmVudF8w"><span class="b">current</span></a><span class="f">-&gt;</span><span class="b">flags</span> <span class="f">|=</span> <a href="cpu.c_macros_ref.html#_UEZfRlJFRVpFUl9TS0lQXzA_"><span class="b">PF_FREEZER_SKIP</span></a><span class="f">;</span>
<a name="371" /><span class="True">     371:</span>     <span class="b">mutex_lock</span><span class="f">(</span><span class="f">&amp;</span><span class="b">pm_mutex</span><span class="f">)</span><span class="f">;</span>
<a name="372" /><span class="True">     372:</span> <span class="f">}</span>
<a name="373" /><span class="True">     373:</span> 
<a name="374" /><span class="True">     374:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">unlock_system_sleep</span><span class="f">(</span><span class="m">void</span><span class="f">)</span>
<a name="375" /><span class="True">     375:</span> <span class="f">{</span>
<a name="376" /><span class="True">     376:</span>     <span class="k">/*</span>
<a name="377" /><span class="True">     377:</span> <span class="k">     * Don&apos;t use freezer_count() because we don&apos;t want the call to</span>
<a name="378" /><span class="True">     378:</span> <span class="k">     * try_to_freeze() here.</span>
<a name="379" /><span class="True">     379:</span> <span class="k">     *</span>
<a name="380" /><span class="True">     380:</span> <span class="k">     * Reason:</span>
<a name="381" /><span class="True">     381:</span> <span class="k">     * Fundamentally, we just don&apos;t need it, because freezing condition</span>
<a name="382" /><span class="True">     382:</span> <span class="k">     * doesn&apos;t come into effect until we release the pm_mutex lock,</span>
<a name="383" /><span class="True">     383:</span> <span class="k">     * since the freezer always works with pm_mutex held.</span>
<a name="384" /><span class="True">     384:</span> <span class="k">     *</span>
<a name="385" /><span class="True">     385:</span> <span class="k">     * More importantly, in the case of hibernation,</span>
<a name="386" /><span class="True">     386:</span> <span class="k">     * unlock_system_sleep() gets called in snapshot_read() and</span>
<a name="387" /><span class="True">     387:</span> <span class="k">     * snapshot_write() when the freezing condition is still in effect.</span>
<a name="388" /><span class="True">     388:</span> <span class="k">     * Which means, if we use try_to_freeze() here, it would make them</span>
<a name="389" /><span class="True">     389:</span> <span class="k">     * enter the refrigerator, thus causing hibernation to lockup.</span>
<a name="390" /><span class="True">     390:</span> <span class="k">     */</span>
<a name="391" /><span class="True">     391:</span>     <a href="cpu.c_macros_ref.html#_Y3VycmVudF8w"><span class="b">current</span></a><span class="f">-&gt;</span><span class="b">flags</span> <span class="f">&amp;=</span> <span class="f">~</span><a href="cpu.c_macros_ref.html#_UEZfRlJFRVpFUl9TS0lQXzA_"><span class="b">PF_FREEZER_SKIP</span></a><span class="f">;</span>
<a name="392" /><span class="True">     392:</span>     <span class="b">mutex_unlock</span><span class="f">(</span><span class="f">&amp;</span><span class="b">pm_mutex</span><span class="f">)</span><span class="f">;</span>
<a name="393" /><span class="True">     393:</span> <span class="f">}</span>
<a name="394" /><span class="True">     394:</span> 
<a name="395" /><span class="False">     395:</span> <span class="f">#</span><span class="n">else</span> <span class="k">/* !CONFIG_PM_SLEEP */</span>
<a name="396" /><span class="False">     396:</span> 
<a name="397" /><span class="False">     397:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">register_pm_notifier</span><span class="f">(</span><span class="m">struct</span> <span class="b">notifier_block</span> <span class="f">*</span><span class="b">nb</span><span class="f">)</span>
<a name="398" /><span class="False">     398:</span> <span class="f">{</span>
<a name="399" /><span class="False">     399:</span>     <span class="m">return</span> <span class="c">0</span><span class="f">;</span>
<a name="400" /><span class="False">     400:</span> <span class="f">}</span>
<a name="401" /><span class="False">     401:</span> 
<a name="402" /><span class="False">     402:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">unregister_pm_notifier</span><span class="f">(</span><span class="m">struct</span> <span class="b">notifier_block</span> <span class="f">*</span><span class="b">nb</span><span class="f">)</span>
<a name="403" /><span class="False">     403:</span> <span class="f">{</span>
<a name="404" /><span class="False">     404:</span>     <span class="m">return</span> <span class="c">0</span><span class="f">;</span>
<a name="405" /><span class="False">     405:</span> <span class="f">}</span>
<a name="406" /><span class="False">     406:</span> 
<a name="407" /><span class="False">     407:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_ref.html#_cG1fbm90aWZpZXJfMA__"><span class="b">pm_notifier</span></a><span class="f">(</span><span class="b">fn</span><span class="f">,</span> <span class="b">pri</span><span class="f">)</span>    <span class="m">do</span> <span class="f">{</span> <span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">(</span><span class="b">fn</span><span class="f">)</span><span class="f">;</span> <span class="f">}</span> <span class="m">while</span> <span class="f">(</span><span class="c">0</span><span class="f">)</span>
<a name="408" /><span class="False">     408:</span> 
<a name="409" /><span class="False">     409:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">bool</span> <span class="b">pm_wakeup_pending</span><span class="f">(</span><span class="m">void</span><span class="f">)</span> <span class="f">{</span> <span class="m">return</span> <span class="m">false</span><span class="f">;</span> <span class="f">}</span>
<a name="410" /><span class="False">     410:</span> 
<a name="411" /><span class="False">     411:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">lock_system_sleep</span><span class="f">(</span><span class="m">void</span><span class="f">)</span> <span class="f">{</span><span class="f">}</span>
<a name="412" /><span class="False">     412:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">unlock_system_sleep</span><span class="f">(</span><span class="m">void</span><span class="f">)</span> <span class="f">{</span><span class="f">}</span>
<a name="413" /><span class="False">     413:</span> 
<a name="414" /><span class="True">     414:</span> <span class="f">#</span><span class="n">endif</span> <span class="k">/* !CONFIG_PM_SLEEP */</span>
<a name="415" /><span class="True">     415:</span> 
<a name="416" /><span class="True">     416:</span> <span class="f">#</span><span class="n">ifdef</span> <a href="cpu.c_macros_ref.html#_Q09ORklHX1BNX1NMRUVQX0RFQlVHXzA_"><span class="b">CONFIG_PM_SLEEP_DEBUG</span></a>
<a name="417" /><span class="True">     417:</span> <span class="m">extern</span> <span class="m">bool</span> <span class="b">pm_print_times_enabled</span><span class="f">;</span>
<a name="418" /><span class="False">     418:</span> <span class="f">#</span><span class="n">else</span>
<a name="419" /><span class="False">     419:</span> <span class="f">#</span><span class="n">define</span> <span class="b">pm_print_times_enabled</span>    <span class="f">(</span><span class="m">false</span><span class="f">)</span>
<a name="420" /><span class="True">     420:</span> <span class="f">#</span><span class="n">endif</span>
<a name="421" /><span class="True">     421:</span> 
<a name="422" /><span class="False">     422:</span> <span class="f">#</span><span class="n">ifdef</span> <span class="b">CONFIG_PM_AUTOSLEEP</span>
<a name="423" /><span class="False">     423:</span> 
<a name="424" /><span class="False">     424:</span> <span class="k">/* kernel/power/autosleep.c */</span>
<a name="425" /><span class="False">     425:</span> <span class="m">void</span> <span class="b">queue_up_suspend_work</span><span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">;</span>
<a name="426" /><span class="False">     426:</span> 
<a name="427" /><span class="True">     427:</span> <span class="f">#</span><span class="n">else</span> <span class="k">/* !CONFIG_PM_AUTOSLEEP */</span>
<a name="428" /><span class="True">     428:</span> 
<a name="429" /><span class="True">     429:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">queue_up_suspend_work</span><span class="f">(</span><span class="m">void</span><span class="f">)</span> <span class="f">{</span><span class="f">}</span>
<a name="430" /><span class="True">     430:</span> 
<a name="431" /><span class="True">     431:</span> <span class="f">#</span><span class="n">endif</span> <span class="k">/* !CONFIG_PM_AUTOSLEEP */</span>
<a name="432" /><span class="True">     432:</span> 
<a name="433" /><span class="False">     433:</span> <span class="f">#</span><span class="n">ifdef</span> <span class="b">CONFIG_ARCH_SAVE_PAGE_KEYS</span>
<a name="434" /><span class="False">     434:</span> <span class="k">/*</span>
<a name="435" /><span class="False">     435:</span> <span class="k"> * The ARCH_SAVE_PAGE_KEYS functions can be used by an architecture</span>
<a name="436" /><span class="False">     436:</span> <span class="k"> * to save/restore additional information to/from the array of page</span>
<a name="437" /><span class="False">     437:</span> <span class="k"> * frame numbers in the hibernation image. For s390 this is used to</span>
<a name="438" /><span class="False">     438:</span> <span class="k"> * save and restore the storage key for each page that is included</span>
<a name="439" /><span class="False">     439:</span> <span class="k"> * in the hibernation image.</span>
<a name="440" /><span class="False">     440:</span> <span class="k"> */</span>
<a name="441" /><span class="False">     441:</span> <span class="m">unsigned</span> <span class="m">long</span> <span class="b">page_key_additional_pages</span><span class="f">(</span><span class="m">unsigned</span> <span class="m">long</span> <span class="b">pages</span><span class="f">)</span><span class="f">;</span>
<a name="442" /><span class="False">     442:</span> <span class="m">int</span> <span class="b">page_key_alloc</span><span class="f">(</span><span class="m">unsigned</span> <span class="m">long</span> <span class="b">pages</span><span class="f">)</span><span class="f">;</span>
<a name="443" /><span class="False">     443:</span> <span class="m">void</span> <span class="b">page_key_free</span><span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">;</span>
<a name="444" /><span class="False">     444:</span> <span class="m">void</span> <span class="b">page_key_read</span><span class="f">(</span><span class="m">unsigned</span> <span class="m">long</span> <span class="f">*</span><span class="b">pfn</span><span class="f">)</span><span class="f">;</span>
<a name="445" /><span class="False">     445:</span> <span class="m">void</span> <span class="b">page_key_memorize</span><span class="f">(</span><span class="m">unsigned</span> <span class="m">long</span> <span class="f">*</span><span class="b">pfn</span><span class="f">)</span><span class="f">;</span>
<a name="446" /><span class="False">     446:</span> <span class="m">void</span> <span class="b">page_key_write</span><span class="f">(</span><span class="m">void</span> <span class="f">*</span><span class="b">address</span><span class="f">)</span><span class="f">;</span>
<a name="447" /><span class="False">     447:</span> 
<a name="448" /><span class="True">     448:</span> <span class="f">#</span><span class="n">else</span> <span class="k">/* !CONFIG_ARCH_SAVE_PAGE_KEYS */</span>
<a name="449" /><span class="True">     449:</span> 
<a name="450" /><span class="True">     450:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">unsigned</span> <span class="m">long</span> <span class="b">page_key_additional_pages</span><span class="f">(</span><span class="m">unsigned</span> <span class="m">long</span> <span class="b">pages</span><span class="f">)</span>
<a name="451" /><span class="True">     451:</span> <span class="f">{</span>
<a name="452" /><span class="True">     452:</span>     <span class="m">return</span> <span class="c">0</span><span class="f">;</span>
<a name="453" /><span class="True">     453:</span> <span class="f">}</span>
<a name="454" /><span class="True">     454:</span> 
<a name="455" /><span class="True">     455:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span>  <span class="b">page_key_alloc</span><span class="f">(</span><span class="m">unsigned</span> <span class="m">long</span> <span class="b">pages</span><span class="f">)</span>
<a name="456" /><span class="True">     456:</span> <span class="f">{</span>
<a name="457" /><span class="True">     457:</span>     <span class="m">return</span> <span class="c">0</span><span class="f">;</span>
<a name="458" /><span class="True">     458:</span> <span class="f">}</span>
<a name="459" /><span class="True">     459:</span> 
<a name="460" /><span class="True">     460:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">page_key_free</span><span class="f">(</span><span class="m">void</span><span class="f">)</span> <span class="f">{</span><span class="f">}</span>
<a name="461" /><span class="True">     461:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">page_key_read</span><span class="f">(</span><span class="m">unsigned</span> <span class="m">long</span> <span class="f">*</span><span class="b">pfn</span><span class="f">)</span> <span class="f">{</span><span class="f">}</span>
<a name="462" /><span class="True">     462:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">page_key_memorize</span><span class="f">(</span><span class="m">unsigned</span> <span class="m">long</span> <span class="f">*</span><span class="b">pfn</span><span class="f">)</span> <span class="f">{</span><span class="f">}</span>
<a name="463" /><span class="True">     463:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">page_key_write</span><span class="f">(</span><span class="m">void</span> <span class="f">*</span><span class="b">address</span><span class="f">)</span> <span class="f">{</span><span class="f">}</span>
<a name="464" /><span class="True">     464:</span> 
<a name="465" /><span class="True">     465:</span> <span class="f">#</span><span class="n">endif</span> <span class="k">/* !CONFIG_ARCH_SAVE_PAGE_KEYS */</span>
<a name="466" /><span class="True">     466:</span> 
<a name="467" /><span class="True">     467:</span> <span class="f">#</span><span class="n">endif</span> <span class="k">/* _LINUX_SUSPEND_H */</span>
<a name="468" /><span class="True">     468:</span> </pre>
  </body>
</html>
